package org.bingo.repository;

import org.bingo.entity.Comment;
import org.bingo.entity.User;
import org.bingo.entity.Video;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CommentRepository extends JpaRepository<Comment, Long> {
    Page<Comment> findByCommentLevelAndVideo(Integer commentLevel, Video video, Pageable pageable);
    List<Comment> findByUser(User user);
}
